package cn.bas.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

// 1.创建BasServerProperties 属性配置类，读取前缀bas.server生效
@ConfigurationProperties(prefix = "bas.server")
public class BasServerProperties {
    // 默认端口
    private static final Integer DEFAULT_PORT=8080;

    // 端口
    private Integer port = DEFAULT_PORT;

    public static Integer getDefaultPort(){
        return DEFAULT_PORT;
    }

    public Integer getPort(){
        return port;
    }

    public BasServerProperties setPort(Integer port){
        this.port = port;
        return this;
    }
}
